package com.carrie.mdg.myviewtext.utils;

import android.os.Build;


public class VersionUtil {

    // android 4.3
    public static boolean hasKitkat () {
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
    }

    // android 5.0
    public static boolean hasLollipop () {
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
    }

    // android 6.0
    public static boolean hasMarshmallow () {
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
    }

    // android 7.0
    public static boolean hasNougat () {
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N;
    }

    // android 8.0
    public static boolean hasOreo () {
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O;
    }

    // android 9.0
    public static boolean hasP() {
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.P;
    }
}
